package com.tjbank.cssys.web.service.impl;

import com.alibaba.fastjson.JSON;
import com.tjbank.cssys.domain.CkOrderAccountAgeForm2;
import com.tjbank.cssys.repository.CkOrderRecoveryDataMapper;
import com.tjbank.cssys.web.service.CkOrderAccountAgeFormService;
import com.tjbank.cssys.web.util.TimeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

@Service
public class CkOrderAccountAgeFormServiceImpl implements CkOrderAccountAgeFormService {
    protected static final Logger logger = LoggerFactory.getLogger(CkOrderAccountAgeFormServiceImpl.class);
    @Autowired
    private CkOrderRecoveryDataMapper ckOrderRecoveryDataMapper;
    @Override
    public List<CkOrderAccountAgeForm2> selectAllCkOrderAccountAgeForm2(String dateTime) {
        try {
            logger.info("获取账龄列表2start---参数：param:"+dateTime);
            dateTime="%"+dateTime+"%";
            List<CkOrderAccountAgeForm2> ckOrderAccountAgeForm2s = ckOrderRecoveryDataMapper.selectAllCkOrderAccountAgeForm2(dateTime);
            logger.info("获取账龄表2结束----返回值:"+JSON.toJSONString(ckOrderAccountAgeForm2s));
            return ckOrderAccountAgeForm2s;
        } catch (Exception e) {
            logger.error("获取账龄表2失败",e);
            throw e;
        }
    }

}
